﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace cludg.Domain.Extensions
{
	public class DomainExtension
	{
		public Type DomainType { get; set; }
		public Type PropertyType { get; set; }
		public string PropertyName { get; set; }
		public object DefaultValue { get; set; }
	}

	public static class DomainExtensionHelper
	{
		public static IEnumerable<DomainExtension> ForDomain<TDomain>(this IEnumerable<DomainExtension> extensions) where TDomain : class
		{
			return extensions.Where(x => x.DomainType is TDomain);
		}
	}
}
